<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>isDisjoint</title>
</head>

<body>
    <script>
        const isDisjoint = (a, b) => {
            const sA = new Set(a),
                sB = new Set(b);

            return [...sA].every(v => !sB.has(v));
        };
        document.write(`isDisjoint(new Set([1, 2]), new Set([3, 4]))的结果是:${isDisjoint(new Set([1, 2]), new Set([3, 4]))}`)
    </script>
</body>

</html>